﻿'use strict';

describe("Unit: Testing Services", function () {
    describe("Data Service:", function () {
        var service;

        beforeEach(function () {
            module('app');
            module('ccp.dataService');
        });

        beforeEach(inject(function (dataService) {
            service = dataService;
        }));

        it('should contain a dataService',
           function () {
               expect(service).not.toBeNull();
           });

        it('should return \'Hello, world!\' when called with \'world\'',
            inject(function (dataService) {
                service.sayHello("world").then(function (message) {
                    expect(message.data).toBe("Hello, world!");
                });
            }));
    });
});